#!/usr/bin/env node


const fs = require('fs'),
  log = console.log;
//src = process.argv[2];

//let w = fs.watch(src, (evt,file)=>{
//    console.log(`${file}:${evt}`);
  
let w = fs.watch(__dirname,log);



//});
process.on('SIGNINT',()=>{
  w.close();

  log('the listener will stop listening');
  log('and it will stop after 5 seconds!');
  setTimeout(()=>{
    process.exit();
  },5000);
});

